package com.yunti.springboot.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yunti.springboot.po.School;
import com.yunti.springboot.vo.req.SchoolReq;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 用户角色关联表 Mapper 接口
 * </p>
 *
 * @author kmustleng
 * @since 2022-12-09
 */
public interface SchoolMapper extends BaseMapper<School> {

    List<Map<String,String>> getSchoolListPage(@Param("req") SchoolReq req, @Param("page") Page page);

    @Select("select name from school where id = #{schoolId} limit 0,1")
    String getSchoolNameById(Integer schoolId);
}
